import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.request.ZhimaCreditScoreBriefGetRequest;
import com.alipay.api.response.ZhimaCreditScoreBriefGetResponse;

/////11111111
public class Test {

	public static void main(String[] args) throws AlipayApiException {
		String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
		String private_key = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALuvpF5rLFNiduHJ7eskvM0pNYHizcd7XEN/iWtRo/HoEpyC4VSHkFejBKQCfuW/igqpNACPSVnTBgj3cB8WvXeVU9QfXNXuU0GcYvfd6CfOg+1frBtL5+D45E1swi5aViDZRG4QBOQs9z3YWaar+rVruLcZXICKXY548BHIrhRrAgMBAAECgYAk02rB5+9zkP9YgCGBoNy2uJ46FQFhYbARwmV5PDSZ03pLYVbLGipVN7RCZgb2F2YDf32nmnW+/SvS+JH0V6bnCE+w1KW95qyx/GvguhaW7YW9VUDs06vSTcbwUSMfA5XILy4JESlLuhHbL7bRDMWPAYriVLw3RThpIO9JbI7NOQJBAPP17tB+4leGverAhfzWmNyX7LclOO7NXxmCuof8A0kxuJnnRHqf16PRGYapn1IDEdA3JzWmV0KWkm+swIC17CcCQQDE8sRGCUfkY6odTQ4zBkUkmE+smlpWuFIFa8PTmr7P082pK/vzMfJeeVprFyh3jwuviTWX497VtZ4aLTtsy4wdAkEAxKL+Et+y4Imimo0DcoAmRefOzPAbq5+tf4p3fxQKMfz5plNaRtx/m3L2+CvQVvJScVmDKSMiQnHLJmg/4X7BEQJAY0ZoD1GgToy6dFiiHrA7bC3mg3+up+XzWk4vANwQ8Nu34F2Oe9EideK/5BlhSZrubgZA4JZ5fco1rsY8HSQhNQJAAoSyDrXtHErLisoMPH6b9KILDy/90DaiMOSYuikTJE9MrTGSIk6CZHqbIspkLCbm2GbE/dKe0LAcWdbWOgvaJg==";
		String app_id = "2014072300007148";
		AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",app_id,private_key,"json","utf-8",alipay_public_key,"RSA2");
		ZhimaCreditScoreBriefGetRequest request = new ZhimaCreditScoreBriefGetRequest();
		request.setBizContent("{" +
		"    \"transaction_id\":\"201512100936588040000000465158\"," +
		"    \"product_code\":\"w1010100000000002733\"," +
		"    \"cert_type\":\"IDENTITY_CARD\"," +
		"    \"cert_no\":\"441721198709021511\"," +
		"    \"name\":\"陈廷敏\"," +
		"    \"admittance_score\":650" +
		"  }");
		ZhimaCreditScoreBriefGetResponse response = alipayClient.execute(request);
		if(response.isSuccess()){
		System.out.println("调用成功");
		} else {
		System.out.println("调用失败");
		}

	}
	
	public void  zmxyScore() throws Exception{
		String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
		String private_key = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALuvpF5rLFNiduHJ7eskvM0pNYHizcd7XEN/iWtRo/HoEpyC4VSHkFejBKQCfuW/igqpNACPSVnTBgj3cB8WvXeVU9QfXNXuU0GcYvfd6CfOg+1frBtL5+D45E1swi5aViDZRG4QBOQs9z3YWaar+rVruLcZXICKXY548BHIrhRrAgMBAAECgYAk02rB5+9zkP9YgCGBoNy2uJ46FQFhYbARwmV5PDSZ03pLYVbLGipVN7RCZgb2F2YDf32nmnW+/SvS+JH0V6bnCE+w1KW95qyx/GvguhaW7YW9VUDs06vSTcbwUSMfA5XILy4JESlLuhHbL7bRDMWPAYriVLw3RThpIO9JbI7NOQJBAPP17tB+4leGverAhfzWmNyX7LclOO7NXxmCuof8A0kxuJnnRHqf16PRGYapn1IDEdA3JzWmV0KWkm+swIC17CcCQQDE8sRGCUfkY6odTQ4zBkUkmE+smlpWuFIFa8PTmr7P082pK/vzMfJeeVprFyh3jwuviTWX497VtZ4aLTtsy4wdAkEAxKL+Et+y4Imimo0DcoAmRefOzPAbq5+tf4p3fxQKMfz5plNaRtx/m3L2+CvQVvJScVmDKSMiQnHLJmg/4X7BEQJAY0ZoD1GgToy6dFiiHrA7bC3mg3+up+XzWk4vANwQ8Nu34F2Oe9EideK/5BlhSZrubgZA4JZ5fco1rsY8HSQhNQJAAoSyDrXtHErLisoMPH6b9KILDy/90DaiMOSYuikTJE9MrTGSIk6CZHqbIspkLCbm2GbE/dKe0LAcWdbWOgvaJg==";
		String app_id = "2014072300007148";
		AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",app_id,private_key,"json","utf-8",alipay_public_key,"RSA2");
		ZhimaCreditScoreBriefGetRequest request = new ZhimaCreditScoreBriefGetRequest();
		request.setBizContent("{" +
		"    \"transaction_id\":\"201512100936588040000000465158\"," +
		"    \"product_code\":\"w1010100000000002733\"," +
		"    \"cert_type\":\"IDENTITY_CARD\"," +
		"    \"cert_no\":\"441721198709021511\"," +
		"    \"name\":\"陈廷敏\"," +
		"    \"admittance_score\":650" +
		"  }");
		ZhimaCreditScoreBriefGetResponse response = alipayClient.execute(request);
		if(response.isSuccess()){
		System.out.println("调用成功");
		} else {
		System.out.println("调用失败");
		}
	}

}
